home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Installer SDK Cornucopia 1.0.2 / Script Examples / Install App Fat⁄PPC⁄68K / CheckIfInternalRuleFunc.c next >
Encoding:
C/C++ Source or Header  |  1996-09-19  |  604 b   |  20 lines  |  [TEXT/MPS ]

  1. #include    <Files.h>
  2. #include    "InstallerScript.h"
  3.  
  4. long CheckIfInternalRuleFunc( RuleFunctionPBPtr    theRuleFuncPBPtr )
  5. {
  6.     HParamBlockRec    volInfoPBRec;
  7.     OSErr            err;
  8.     
  9.     volInfoPBRec.volumeParam.ioResult         = noErr;
  10.     volInfoPBRec.volumeParam.ioCompletion     = 0;
  11.     volInfoPBRec.volumeParam.ioNamePtr         = 0L;
  12.     volInfoPBRec.volumeParam.ioVRefNum         = theRuleFuncPBPtr->fTargetVRefNum;
  13.     volInfoPBRec.volumeParam.ioVolIndex     = 0;        
  14.     err = PBHGetVInfo( &volInfoPBRec, 0 );
  15.  
  16.     if( err == noErr && volInfoPBRec.volumeParam.ioVDRefNum == -33 )
  17.         return kTRUERuleFunctionResult;
  18.     else         
  19.         return kFALSERuleFunctionResult;
  20. }